package com.liu.excel;

import java.io.File;

import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;

/**
 * 更新
 * @author My
 *
 */
public class UpdateXLS {
	
	@SuppressWarnings("unused")
	public static void main(String[] args) throws Exception {
		//Excel获得文件
		Workbook web=Workbook.getWorkbook(new File("测试.xls"));
		//打开一个文件副本，并且指定数据写回源文件
		WritableWorkbook book=Workbook.createWorkbook(new File("测试.xls"));
		//添加一个工作表
		WritableSheet sheet=book.createSheet("第二页", 1);
		sheet.addCell(new Label(0,0,"这是第二页的数据"));
		book.write();
		book.close();
		
		
		
		
	}

}
